package collection;

import java.util.*;

public class LambdaDemo {
    public static void main(String[] args) {
        List<Point> list = new ArrayList<>();
        Collections.sort(list, new Comparator<Point>() {
            @Override
            public int compare(Point o1, Point o2) {
                return o1.length() - o2.length();
            }
        });

        Collections.sort(list, (o1, o2) -> o1.length() - o2.length());



    }
    }

